// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
import login from '@/views/login';
import index from '@/views/index';

import User from '@/views/user/User';

import Course from '@/views/course/Course';
import SysUser from '@/views/system/SysUser';
import First from '@/views/system/First';
import Card from '@/views/system/Card';
import Coach from '@/views/coach/Coach';
import druidLogin from '@/views/druid/login';
import statistics from '@/views/charts/statistics';
import Personal from '@/views/system/Personal'
import Album from '@/views/system/album'

Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [
        {
            path: '/',
            name: '',
            component: login,
            hidden: true,
            meta: {
                requireAuth: false
            }
        },
        {
            path: '/login',
            name: '登录',
            component: login,
            hidden: true,
            meta: {
                requireAuth: false
            }
        },
        {
            path: '/index',
            name: '首页',
            component: index,
            iconCls: 'el-icon-tickets',
            children: [
                {
                    path: '/user/User',
                    name: '会员信息',
                    component: User,
                    meta: {
                        requireAuth: true
                    }
                },
                 {
                    path: '/course/Course',
                    name: '课程列表',
                    component: Course,
                    meta: {
                        requireAuth: true
                    }
                }, {
                    path: '/system/SysUser',
                    name: '用户管理',
                    component: SysUser,
                    meta: {
                        requireAuth: true
                    }
                },  {
                    path: '/system/First',
                    name: '首页管理',
                    component: First,
                    meta: {
                        requireAuth: true
                    }
                }, {
                    path: '/system/Card',
                    name: '会员卡管理',
                    component: Card,
                    meta: {
                        requireAuth: true
                    }
                }, {
                    path: '/coach/Coach',
                    name: '教练管理',
                    component: Coach,
                    meta: {
                        requireAuth: true
                    }
                },  {
                    path: '/druid/login',
                    name: '监控查询',
                    component: druidLogin,
                    meta: {
                        requireAuth: true
                    }
                }, {
                    path: '/charts/statistics',
                    name: '数据可视化',
                    component: statistics,
                    meta: {
                        requireAuth: true
                    }
                }, {
                    path: '/system/Personal',
                    name: '个人中心',
                    component: Personal,
                    meta: {
                        requireAuth: true
                    }
                }, {
                    path: '/system/album',
                    name: '店铺相册',
                    component: Album,
                    meta: {
                        requireAuth: true
                    }
                }]
        }]
})